Skip to content

Jazzy Fix: systemd Resource Limits #246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: jazzy
Choose a base branch
from

Conversation

luis-camero
Copy link
Contributor

Remove limits on RTPrio and MEMLock in systemd services.

Services are by default resource locked, however, if ran as root, these services have unrestricted access to resources such as scheduling priority and locking memory in place.

When running services as a non root user, the default resource locks apply unless explicitly overwritten. These default resource limits can be defined system wide using the /etc/systemd/system.conf, but by default this file is empty and all limits are unset. This does not mean that by default these resources are unrestricted, instead these limits fall to the kernel and operating system.

Therefore, every service that might run processes that require real-time scheduling or locked-in-memory, such as the ros2_control controller or manipulator communication, needs to have these resources unrestricted.

@luis-camero luis-camero changed the title Remove limits on RTPrio and MEMLock in systemd services Fix: systemd Resource Limits Jul 17, 2025
@luis-camero luis-camero changed the title Fix: systemd Resource Limits Jazzy Fix: systemd Resource Limits Jul 21, 2025
@luis-camero luis-camero marked this pull request as ready for review July 21, 2025 14:05
@luis-camero luis-camero requested a review from a team as a code owner July 21, 2025 14:05
@luis-camero luis-camero requested review from civerachb-cpr and roni-kreinin and removed request for a team July 21, 2025 14:05
@@ -7,6 +7,8 @@ After=clearpath-robot.service
User=administrator
Type=simple
ExecStart=/usr/sbin/clearpath-platform-extras-start
LimitRTPRIO=infinity
LimitMEMLOCK=infinity
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of allowing infinite memory, on the outside chance that there's a memory leak in a node implementation is it worth setting a finite, but still very high limit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants